 //字数限制
 function strLimit(elId, elnum, num) {
    var oElId = document.getElementById(elId)
    var oElNum = document.getElementById(elnum)
    oElId.addEventListener('input', function () {
        var len = this.value.length
        if (len > num) {
            this.value = this.value.substring(0, num);
        } 
        oElNum.innerText = this.value.length
    }, false)
}